/*
 * @Author: gyc
 * @Date: 2020-07-22 13:13:03
 * @LastEditTime: 2020-07-25 16:35:47
 * @Description: Nuxt测试版
 */
'use strict';

const Controller = require('egg').Controller;

class MusicController extends Controller {
    async create() {
        const {
            ctx
        } = this
        const data = ctx.query
        const result = await ctx.service.share.create(data)
        ctx.body = {
            data: result
        }
    }
    async findMy() {
        const {
            ctx
        } = this
        const userid = ctx.query.userid
        const page = ctx.query.page
        const result = await ctx.service.share.findMy(userid, page)
        ctx.body = {
            data: result
        }
    }
    //删除我的分享
    async deleteMyShare() {
        const {
            ctx
        } = this
        const userid = ctx.query.userid
        const id = ctx.query.id
        const result = await ctx.service.share.deleteMyShare(userid, id)
        ctx.body = {
            data: result
        }
    }

}

module.exports = MusicController